<template>
	<div>
		<view class="navbar">
			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }"
			 @click="tabClick(index)">
				{{ item.text + '(' +  item.length +')' }}
			</view>
		</view>
		<view class="record-content" v-if="tabCurrentIndex === 0">
			<view v-if="ticketList">
				<view class="record-item" :key="index" v-for="(item, index) in ticketList" @click="goOrderDetail(item.id)">
					<view class="item-title">
						<view class="left-border"></view>
						<view class="left">{{ticketType[item['工单类型']]}}</view>
						<view class="right">{{item['工单编号']}}</view>
					</view>
					<view class="item-content">
						<view class="content-top">
							<view>报事人名 ：{{item['联系人姓名']}}</view>
							<view class="handle">去处理</view>
						</view>
						<view class="content-center">联系电话 ：{{item['联系人电话']}}</view>
						<view class="content-bottom">
							<view>报事地址 ：{{item['报事位置']}}</view>
							<view class="transfer">转派单</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else>
				<van-empty description="暂无工单" />
			</view>
		</view>
		<view class="record-content" v-if="tabCurrentIndex === 1">
			<view v-if="handleList">
				<view class="record-item" :key="index" v-for="(item, index) in handleList" @click="goOrderDetail(item.id)">
					<view class="item-title">
						<view class="left-border"></view>
						<view class="left">{{ticketType[item['工单类型']]}}</view>
						<view class="right">{{item['工单编号']}}</view>
					</view>
					<view class="item-content">
						<view class="content-top">
							<view>报事人名 ：{{item['联系人姓名']}}</view>
							<view class="handle">处理中</view>
						</view>
						<view class="content-center">联系电话 ：{{item['联系人电话']}}</view>
						<view class="content-bottom">
							<view>报事地址 ：{{item['报事位置']}}</view>
							<view class="transfer">转派单</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else>
				<van-empty description="暂无工单" />
			</view>
		</view>
		<view class="record-content" v-if="tabCurrentIndex === 2">
			<view v-if="completeList">
				<view class="record-item" :key="index" v-for="(item, index) in completeList" @click="goOrderDetail(item.id)">
					<view class="item-title">
						<view class="left-border"></view>
						<view class="left">{{ticketType[item['工单类型']]}}</view>
						<view class="right">{{item['工单编号']}}</view>
					</view>
					<view class="item-content">
						<view class="content-top">
							<view>报事人名 ：{{item['联系人姓名']}}</view>
							<view class="handle">已完成</view>
						</view>
						<view class="content-center">联系电话 ：{{item['联系人电话']}}</view>
						<view class="content-bottom">
							<view>报事地址 ：{{item['报事位置']}}</view>
							<view class="transfer">转派单</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else>
				<van-empty description="暂无工单" />
			</view>
		</view>
		<view class="record-content" v-if="tabCurrentIndex === 3">
			<view v-if="abandonList">
				<view class="record-item" :key="index" v-for="(item, index) in abandonList" @click="goOrderDetail(item.id)">
					<view class="item-title">
						<view class="left-border"></view>
						<view class="left">{{ticketType[item['工单类型']]}}</view>
						<view class="right">{{item['工单编号']}}</view>
					</view>
					<view class="item-content">
						<view class="content-top">
							<view>报事人名 ：{{item['联系人姓名']}}</view>
							<view class="handle">已废弃</view>
						</view>
						<view class="content-center">联系电话 ：{{item['联系人电话']}}</view>
						<view class="content-bottom">
							<view>报事地址 ：{{item['报事位置']}}</view>
							<view class="transfer">转派单</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else>
				<van-empty description="暂无工单" />
			</view>
		</view>
	</div>
</template>

<script>
</script>

<style>
</style>
